<?php
class Modules_Workspace_Model_ChangeWorkspace
	{
	
		public $result=array("error"=>"","result"=>0);
		public function Modules_Workspace_Model_ChangeWorkspace($args=null)
		{
			
			if($args==null)
				return;
			try{
				if(count(Modules_Common_DB_WorkspaceHasUsers::ValidateWorkspace($_SESSION['user'],$args['account']))==1)
					$_SESSION['account']=$args['account'];
			}
			catch(Exception $e)
			{
				$this->result["result"]=0;
				$this->result["error"]="No valid Account";
			}
		}
		public function Init()
		{
			
		}
	}
	?>